package me.goldze.mvvmhabit.http;

/**
 * 项目名称:    zhuayu_android
 * 创建人:      陈锦军
 * 创建时间:    2018/10/1     11:46
 */
public class BaseBean<T> {

    @Override
    public String toString() {
        return "BaseBean{" +
                "data=" + data +
                ", type=" + type +
                ", code=" + code +
                ", info='" + info + '\'' +
                '}';
    }

    /**
     * code : 200
     * info : 成功
     * data : null
     */

    private T data;

    private String extraInfo;

    public String getExtraInfo() {
        return extraInfo;
    }

    public void setExtraInfo(String extraInfo) {
        this.extraInfo = extraInfo;
    }

    //        用于表示当前的请求所属
    private int type;

    public void setType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    private int code=200;
    private String info;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getinfo() {
        return info;
    }

    public void setinfo(String info) {
        this.info = info;
    }
    public boolean isOk() {
        return code == 200;
    }
}
